package org.charles.zhifou.model.dto.user;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.io.Serial;
import java.io.Serializable;

/**
 * 用户登录请求
 *
 * @author Charles
 * @version 1.0
 */
@Data
@Schema(description = "用户登录请求")
public class UserLoginRequest implements Serializable {

    @Schema(description = "用户账号")
    @NotBlank(message = "用户账号不能为空")
    @Length(min = 4, max = 100, message = "用户账号长度不能小于 4 个字符且不能大于 100 个字符")
    private String userAccount;

    @Schema(description = "用户密码")
    @NotBlank(message = "用户密码不能为空")
    @Length(min = 6, max = 100, message = "用户账号长度不能小于 6 个字符且不能大于 100 个字符")
    private String userPassword;

    @Serial
    private static final long serialVersionUID = 1L;
}
